import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/HomeView.vue'),
      meta: { title: '首页' }
    },
    {
      path: '/wardrobe',
      name: 'wardrobe',
      component: () => import('../views/WardrobeView.vue'),
      meta: { title: '我的衣柜' }
    },
    {
      path: '/wardrobe/add',
      name: 'add-clothing',
      component: () => import('../views/AddClothingView.vue'),
      meta: { title: '添加衣服' }
    },
    {
      path: '/clothing/:id/edit',
      name: 'edit-clothing',
      component: () => import('../views/AddClothingView.vue'),
      meta: { title: '编辑衣服' }
    },
    {
      path: '/wardrobe/:id',
      name: 'clothing-detail',
      component: () => import('../views/ClothingDetailView.vue'),
      meta: { title: '衣服详情' }
    },
    {
      path: '/outfits',
      name: 'outfits',
      component: () => import('../views/OutfitsView.vue'),
      meta: { title: '搭配管理' }
    },
    {
      path: '/outfits/create',
      name: 'create-outfit',
      component: () => import('../views/CreateOutfitView.vue'),
      meta: { title: '创建搭配' }
    },
    {
      path: '/outfits/:id/edit',
      name: 'edit-outfit',
      component: () => import('../views/EditOutfitView.vue'),
      meta: { title: '编辑搭配' }
    },
    {
      path: '/outfits/:id',
      name: 'outfit-detail',
      component: () => import('../views/OutfitDetailView.vue'),
      meta: { title: '搭配详情' }
    },
    {
      path: '/recommendations',
      name: 'recommendations',
      component: () => import('../views/RecommendationsView.vue'),
      meta: { title: '智能推荐' }
    },
    {
      path: '/statistics',
      name: 'statistics',
      component: () => import('../views/StatisticsView.vue'),
      meta: { title: '穿搭统计' }
    },
    {
      path: '/profile',
      name: 'profile',
      component: () => import('../views/ProfileView.vue'),
      meta: { title: '个人设置' }
    },
    {
      path: '/manage/categories',
      name: 'category-manage',
      component: () => import('../views/CategoryManageView.vue'),
      meta: { title: '分类管理' }
    },
    {
      path: '/manage/tags',
      name: 'tag-manage',
      component: () => import('../views/TagManageView.vue'),
      meta: { title: '标签管理' }
    },
    {
      path: '/recommendation',
      name: 'recommendation',
      component: () => import('../views/RecommendationView.vue'),
      meta: { title: '智能推荐' }
    },
    {
      path: '/analysis',
      name: 'analysis',
      component: () => import('../views/AnalysisView.vue'),
      meta: { title: '穿搭分析' }
    },
    {
      path: '/reminder',
      name: 'reminder',
      component: () => import('../views/ReminderView.vue'),
      meta: { title: '提醒管理' }
    },
    {
      path: '/social',
      name: 'social',
      component: () => import('../views/SocialView.vue'),
      meta: { title: '社交分享' }
    },
    {
      path: '/auth-status',
      name: 'auth-status',
      component: () => import('../components/AuthStatus.vue'),
      meta: { title: '认证状态' }
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue'),
      meta: { title: '登录' }
    }
  ],
})

export default router
